/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GenericSettingsView.java
 *
 * Created on 30-nov-2009, 18:26:29
 */

package View;

import Enum.DifficultyLevel;
import UseCaseController.GenericNewGameUCC;
import UseCaseController.SettingsUseCaseController;

/**
 *
 * @author Administrador
 */

public class SettingsView extends GenericSettingsView {


    /** Creates new form GenericSettingsView */
    public SettingsView() {
        initComponents();
    
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        RadioE = new javax.swing.JRadioButton();
        RadioM = new javax.swing.JRadioButton();
        RadioH = new javax.swing.JRadioButton();
        SV_Play = new javax.swing.JButton();
        RadioCPU = new javax.swing.JRadioButton();
        RadioPlayer = new javax.swing.JRadioButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Settings");
        setResizable(false);

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel1.setText("Choose your level");

        buttonGroup1.add(RadioE);
        RadioE.setText("easy");
        RadioE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RadioEActionPerformed(evt);
            }
        });

        buttonGroup1.add(RadioM);
        RadioM.setSelected(true);
        RadioM.setText("normal");
        RadioM.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RadioMActionPerformed(evt);
            }
        });

        buttonGroup1.add(RadioH);
        RadioH.setText("hard");
        RadioH.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RadioHActionPerformed(evt);
            }
        });

        SV_Play.setFont(new java.awt.Font("Tahoma", 1, 14));
        SV_Play.setText("PLAY");
        SV_Play.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SV_PlayActionPerformed(evt);
            }
        });

        buttonGroup2.add(RadioCPU);
        RadioCPU.setSelected(true);
        RadioCPU.setText("Versus CPU");

        buttonGroup2.add(RadioPlayer);
        RadioPlayer.setText("Versus Player");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(52, 52, 52)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(RadioH, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(SV_Play, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(RadioE, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(RadioM))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(RadioPlayer)
                            .addComponent(RadioCPU))))
                .addContainerGap(44, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(92, 92, 92)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(93, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(RadioE, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(RadioCPU))
                .addGap(3, 3, 3)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(RadioM, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(RadioPlayer))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(RadioH, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(SV_Play, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(29, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(12, Short.MAX_VALUE)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void SV_PlayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SV_PlayActionPerformed

DifficultyLevel d;
//        if(RadioE.isSelected()){
//        d = DifficultyLevel.Easy;
//        }else if(RadioM.isSelected()){
//        d = DifficultyLevel.Normal;
//        }else if(RadioH.isSelected()){
//        d = DifficultyLevel.Hard;
//        }
//        
//
//        if(RadioPlayer.isSelected()){
//            v = es jugador
//        }else if(RadioCPU.isSelected()){
//            v = es cpu
//        }
//
//        SettingsUseCaseController s = new SettingsUseCaseController() {
//                    //poner el level aqui de vuestro usecaseconttroller
//            setsettings(d,v);
//        }

        
}//GEN-LAST:event_SV_PlayActionPerformed

    private void RadioMActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RadioMActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_RadioMActionPerformed

    private void RadioHActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RadioHActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_RadioHActionPerformed

    private void RadioEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RadioEActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_RadioEActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new SettingsView().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JRadioButton RadioCPU;
    private javax.swing.JRadioButton RadioE;
    private javax.swing.JRadioButton RadioH;
    private javax.swing.JRadioButton RadioM;
    private javax.swing.JRadioButton RadioPlayer;
    private javax.swing.JButton SV_Play;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables

}
